/*
Copyright (C) 2015 Marien Raat

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include <SFML/Graphics.hpp>

class Player {
public:
    Player(sf::Vector2f startPosition, float rotationInRad,
           float radius, sf::Vector2u screenSize);

    // Returns whether the walls are touched
    bool update();

    void turnLeft();
    void turnRight();
    
    sf::Vector2f getPosition();
    float getRotation(); // In degrees
    float getRadius();
    void addCell(float cellRadius);
private:
    constexpr static float speed = 2.5f,
        radiusGrowth = 0.01f,
        turnSpeed = 0.2f;
    
    sf::Vector2f position;
    sf::Vector2u screenSize;
    float rotationInRad;
    float radius;
};
